package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallCustomerCollect;
import com.appkubes.mall.core.po.MallCustomerCollectExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallCustomerCollectMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerCollectSqlProvider.class, method="countByExample")
    long countByExample(MallCustomerCollectExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallCustomerCollectSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallCustomerCollectExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_customer_collect",
        "where collect_key = #{collectKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String collectKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_customer_collect (collect_key, app_key, ",
        "customer_key, collect_type, ",
        "target_key, flex_segment1, ",
        "flex_segment2, flex_segment3, ",
        "flex_json, create_time, ",
        "update_time, version)",
        "values (#{collectKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{customerKey,jdbcType=VARCHAR}, #{collectType,jdbcType=VARCHAR}, ",
        "#{targetKey,jdbcType=VARCHAR}, #{flexSegment1,jdbcType=VARCHAR}, ",
        "#{flexSegment2,jdbcType=VARCHAR}, #{flexSegment3,jdbcType=VARCHAR}, ",
        "#{flexJson,jdbcType=VARCHAR}, #{createTime,jdbcType=INTEGER}, ",
        "#{updateTime,jdbcType=INTEGER}, #{version,jdbcType=INTEGER})"
    })
    int insert(MallCustomerCollect record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallCustomerCollectSqlProvider.class, method="insertSelective")
    int insertSelective(MallCustomerCollect record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerCollectSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="collect_key", property="collectKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="collect_type", property="collectType", jdbcType=JdbcType.VARCHAR),
        @Result(column="target_key", property="targetKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_json", property="flexJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerCollect> selectByExampleWithRowbounds(MallCustomerCollectExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallCustomerCollectSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="collect_key", property="collectKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="collect_type", property="collectType", jdbcType=JdbcType.VARCHAR),
        @Result(column="target_key", property="targetKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_json", property="flexJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallCustomerCollect> selectByExample(MallCustomerCollectExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "collect_key, app_key, customer_key, collect_type, target_key, flex_segment1, ",
        "flex_segment2, flex_segment3, flex_json, create_time, update_time, version",
        "from mall_customer_collect",
        "where collect_key = #{collectKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="collect_key", property="collectKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="customer_key", property="customerKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="collect_type", property="collectType", jdbcType=JdbcType.VARCHAR),
        @Result(column="target_key", property="targetKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment1", property="flexSegment1", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment2", property="flexSegment2", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_segment3", property="flexSegment3", jdbcType=JdbcType.VARCHAR),
        @Result(column="flex_json", property="flexJson", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.INTEGER),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    MallCustomerCollect selectByPrimaryKey(String collectKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerCollectSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallCustomerCollect record, @Param("example") MallCustomerCollectExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerCollectSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallCustomerCollect record, @Param("example") MallCustomerCollectExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallCustomerCollectSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallCustomerCollect record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_customer_collect
     *
     * @mbg.generated
     */
    @Update({
        "update mall_customer_collect",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "customer_key = #{customerKey,jdbcType=VARCHAR},",
          "collect_type = #{collectType,jdbcType=VARCHAR},",
          "target_key = #{targetKey,jdbcType=VARCHAR},",
          "flex_segment1 = #{flexSegment1,jdbcType=VARCHAR},",
          "flex_segment2 = #{flexSegment2,jdbcType=VARCHAR},",
          "flex_segment3 = #{flexSegment3,jdbcType=VARCHAR},",
          "flex_json = #{flexJson,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=INTEGER},",
          "update_time = #{updateTime,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where collect_key = #{collectKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallCustomerCollect record);
}